<!DOCTYPE html> 
<html>
<?php
	
    require_once("../menu.php");
	require_once('../controllers/squadra.php');
	require_once('../controllers/formazione.php');
	$RISERVA_1 = 1;
	
	date_default_timezone_set('Europe/Rome');
	if(User::getCurrentUser()==null || User::getCurrentUser()->getRuolo()<User::$ADMIN){
		echo "Errore: devi essere un amministratore per visualizzare questa pagina.<br />";
		die();
	}
	function panca($player){
		
		if($player==null){
			echo "<td class='panchina' style='text-align:center'> - </td>";
		}else{
			$n = $player->getNome(); 
			echo "<td class='panchina'>$n</td>";
		}
		
	}
?>
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
		<title>Fantacalcio - Formazioni</title>
		<link rel="stylesheet" href="../fantacalcio.css" type="text/css"/>
		<link rel="stylesheet" href="../dettagli_partite/dettagli.css" type="text/css"/>
		<style type='text/css'>
			td.menuAdmin{
				background-color:rgb(150,202,150);
				color:white;
				font-weight:bold;
				width:300px;
				/*border-right:#535353 1px solid;*/
				border-right:white 3px solid;
				font-size:14px;
			}
			
			td.cc{ /* custom cursor */
				cursor:pointer;
			}
		</style>
		<script type='text/javascript' src='../tinymce/jscripts/tiny_mce/tiny_mce.js' > </script>
		<!-- <script type='text/javascript' src='../jquery.js' > </script> --> 
		<script type="text/javascript"  language="javascript" src="ajax_functions.js">
		</script>
		
		<script type="text/javascript" language="javascript">
			initMove();
			
		</script>

	</head>
	<body>
		<table class="pageTable" cellpadding='0' cellspacing='0'>
			<tr>
				<td>
					<?php echo printMasterMenu('Admin', '../'); ?>
					
				</td>
				
			</tr>
			<tr>
				<td class='contentPage' style="">
					<table style='width:100%'>
						<tr>
							<td colspan='2' class="pageTitle" style='border-bottom: gray 1px solid;'>Amministrazione sito</td>
						</tr>
						<tr>
							<!-- la prima colonna a destra è quella dei menu -->
							<td style='width:300px;vertical-align:top;border-right: gray 1px solid;
								height:600px;background-color:lightgray'>
								<table style='width:100%'>
									<tr>
										<td class='menuAdmin cc' onclick="openMenu('caricaVoti')">Carica voti fantagazzetta</td>
									</tr>
									<tr>
										<td class='menuAdmin cc' onclick="openMenu('caricaQuotazioni')">Carica quotazioni fantagazzetta</td>
									</tr>
									<tr>
										<td class='menuAdmin cc' onclick="openMenu('news')">News</td>
									</tr>
									<tr>
										<td class='menuAdmin cc' onclick="openMenu('calcolaRisultati')">Calcola risultati per giornata</td>
									</tr>
									<tr>
										<td class='menuAdmin cc' onclick="openMenu('utenti')">Gestione utenti</td>
									</tr>
									<tr>
										<td class='menuAdmin cc' onclick="openMenu('leghe')">Gestione leghe</td>
									</tr>
									<tr>
										<td class='menuAdmin cc' onclick="openMenu('squadre')">Gestione squadre</td>
									</tr>
									<?php if(User::getCurrentUser()->getRuolo()>=User::$SA){ ?>
									<tr>
										<td class='menuAdmin cc' onclick="openMenu('sql')">Gestione DB</td>
									</tr>
									<?php } ?>
								</table>
							</td>
							<!-- la seconda colonna mostra il contenuto del menu selezionato -->
							<td style='width:700px;;vertical-align:top;'>
								<div style='width:100%' id='contentAdmin'>
									<p class='adminTitle'>Pagina di amministrazione del sito fanta allenatore<br />	
									</p>
									
								</div>
							</td>
							
						</tr>
						
					</table>
				</td>
			</tr>
		</table>
	</body>
</html>
